import request from 'UTIL/request'

/**
 * 考核档案列表
 * @param params
 */
export function GetMyAppraisalFileList(params) {
  return request({
    url: 'hrmEmployeeAchievementFile/queryMyAppraisalFileList',
    method: 'POST',
    data: params
  })
}
/**
 * 查询绩效档案数量--查询当前员工待处理阶段数据数量
 * @param {*} data
 */
export function hrmPerformanceEmployeeQueryNumAPI() {
  return request({
    url: 'hrmAppraisalEmployee/queryPendingStageNum',
    method: 'post'
  })
}
/**
 * 员工端获取绩效列表
 * @param {*} data
 */
export function queryStageAppraisalListAPI(data) {
  return request({
    url: 'hrmAppraisalEmployee/queryStageAppraisalList',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 员工端头部信息
 * @param {*} data
 */
export function queryEmployeeAppraisalBaseInfo(data) {
  return request({
    url: 'hrmAppraisalEmployee/queryEmployeeAppraisalBaseInfo',
    method: 'post',
    data: data
  })
}
/**
 * 员工端填写列表
 * @param {*} data
 */
export function quotaInformationAPI(data) {
  return request({
    url: 'hrmAppraisalEmployee/quotaInformation',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 员工端填写指标
 * @param {*} data
 */
export function fillInQuotaAPI(data) {
  return request({
    url: 'hrmAppraisalEmployee/fillInQuota',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 员工端绩效管理指标确认
 * @param {*} data
 */
export function targetConfirmationPass(data) {
  return request({
    url: 'hrmAppraisalEmployee/targetConfirmationPass',
    method: 'post',
    data: data,
    header: {
      'Content-Type': 'application/json;charset=UTF-8' // 2024/7/17 后端接口参数是BO类 要用json传参
    }
  })
}
/**
 * 员工端绩效管理指标填写驳回
 * @param {*} data
 */
export function targetConfirmationReject(data) {
  return request({
    url: 'hrmAppraisalEmployee/targetConfirmationReject',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 保存KPI指标评分---只保存评分信息
 * @param {*} data
 * @author: kate同学
 */
export function saveKPIQuotaScoreAPI(data) {
  return request({
    url: 'hrmAppraisalEmployee/saveKPIQuotaScore',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 员工端指标评分保存---只保存评分信息 不更改阶段状态
 * @param {*} data
 */
export function quotaScoreSaveAPI(data) {
  return request({
    url: 'hrmAppraisalEmployee/saveQuotaScore',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 员工端实时评分
 * @param {*} data
 */
export function preCalculationQuotaScore(data) {
  return request({
    url: '/hrmAppraisalEmployee/preCalculationQuotaScore',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 员工端指标评分保存---只更改阶段状态 不保存评分信息
 * @param {*} data
 */
export function updateAppraisalEmployeeStageAPI(data) {
  return request({
    url: 'hrmAppraisalEmployee/updateAppraisalEmployeeStage',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 员工端绩效管理指标评分驳回
 * @param {*} data
 */
export function rejectScore(data) {
  return request({
    url: '/hrmAppraisalEmployee/rejectScore',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 员工端绩效管理驳回选择节点
 * @param {*} data
 */
export function queryScoringPoint(data) {
  return request({
    url: 'hrmAppraisalEmployee/queryScoringPoint',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 员工端绩效管理结果审核驳回
 * @param {*} data
 */
export function resultAuditReject(data) {
  return request({
    url: 'hrmAppraisalEmployee/resultAuditReject',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 员工端绩效管理结果审核通过
 * @param {*} data
 */
export function resultAuditPass(data) {
  return request({
    url: 'hrmAppraisalEmployee/resultAuditPass',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 员工端绩效管理结果审核通过--适用于 整计划审核
 * @param {*} data
 */
export function resultAuditPlanPass(data) {
  return request({
    url: 'hrmAppraisalEmployee/resultAuditPlanPass',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 员工端绩效管理结果确认通过--适用于 全公司确认
 * @param {*} data
 */
export function resultConfirmCompanyPass(data) {
  return request({
    url: 'hrmAppraisalEmployee/resultConfirmCompanyPass',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 员工端绩效管理结果申诉
 * @param {*} data
 */
export function resultAppeal(data) {
  return request({
    url: 'hrmAppraisalEmployee/resultAppeal',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 员工端绩效管理结果确定
 * @param {*} data
 */
export function resultConfirmation(data) {
  return request({
    url: 'hrmAppraisalEmployee/resultConfirmationPass',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 员工端绩效管理申诉确认驳回
 * @param {*} data
 */
export function resultAppealReject(data) {
  return request({
    url: 'hrmAppraisalEmployee/resultAppealReject',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 员工端绩效管理申诉确认
 * @param {*} data
 */
export function resultAppealPass(data) {
  return request({
    url: 'hrmAppraisalEmployee/resultAppealPass',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 指标存储---单个指标信息存储
 * @param {*} data
 */
export function addQuotaAPI(data) {
  return request({
    url: 'hrmAppraisalEmployee/addQuota',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 员工端填写指标--适用于多次填写指标功能--不涉及阶段状态修改
 * @param {*} data
 */
export function saveQuotaAPI(data) {
  return request({
    url: 'hrmAppraisalEmployee/saveQuota',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 员工端删除指标
 * @param {*} data
 * 2024/4/2
 */
export function deleteQuotaAPI(id) {
  return request({
    url: `hrmAppraisalEmployee/deleteQuota/${id}`,
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * @description:
 * @author:
 */
/** *** 员工考核附件相关 */
/**
 * 命名考核附件--按员工考核附件命名规则
 * 2024/4/9 kate
 */
export function renameAdminFileAPI(data) {
  return request({
    url: 'hrmAppraisalEmployee/renameAdminFile',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 添加附件
 * @param {*} data
 */
export function hrmAppraisalEmployeeFileAddAPI(data) {
  return request({
    url: 'hrmAppraisalEmployee/addFile',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 删除附件
 * @param {*} data
 */
export function hrmAppraisalEmployeeFileDeleteAPI(data) {
  return request({
    url: `hrmAppraisalEmployee/deleteFile`,
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 根据附件类型查询附件详情
 * @param {*} data
 */
export function hrmAppraisalEmployeeFileQueryByParamAPI(data) {
  return request({
    url: 'hrmAppraisalEmployee/queryFileByParam',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
